package com.jyu.apts.shiro;

import java.util.Date;

import org.apache.shiro.session.InvalidSessionException;
import org.apache.shiro.session.Session;

import com.jyu.apts.utils.Cache;

public class ShiroSessionCache extends Cache {
	@Override
	public boolean isExpire(Date currentDate) {
		Session session = (Session)this.object;
		try {
			return session.getTimeout() == 0;
		}catch(InvalidSessionException e) {
			return true;
		}
	}
}
